package com.qianli.cashmama.trade.client.trade.request;

import com.fqgj.common.api.Page;
import com.qianli.cashmama.trade.common.enums.TradeCloseTypeEnum;

import java.io.Serializable;

/**
 * Created with IntelliJ IDEA.
 * User: sm
 * Date: 2017/8/2
 * Time: 下午4:09
 * <p>
 * 查询用户的交易列表
 */
public class QueryUserTradeRequest implements Serializable {

    private static final long serialVersionUID = 189781603943921009L;

    /**
     * 用户编码
     */
    private String userCode;

    /**
     * 产品类目
     */
    private String productCategory;

    /**
     * 页
     */
    private Page page = new Page();

    /**
     * 是否关闭
     */
    private Boolean closed;

    /**
     * 关闭类型
     */
    private TradeCloseTypeEnum tradeCloseTypeEnum;

    /**
     * 是否查询卡信息
     */
    private Boolean needCardInfo;

    public Boolean getClosed() {
        return closed;
    }

    public QueryUserTradeRequest setClosed(Boolean closed) {
        this.closed = closed;
        return this;
    }

    public Page getPage() {
        return page;
    }

    public QueryUserTradeRequest setPage(Page page) {
        this.page = page;
        return this;
    }

    public String getUserCode() {
        return userCode;
    }

    public QueryUserTradeRequest setUserCode(String userCode) {
        this.userCode = userCode;
        return this;
    }

    public String getProductCategory() {
        return productCategory;
    }

    public QueryUserTradeRequest setProductCategory(String productCategory) {
        this.productCategory = productCategory;
        return this;
    }

    public TradeCloseTypeEnum getTradeCloseTypeEnum() {
        return tradeCloseTypeEnum;
    }

    public QueryUserTradeRequest setTradeCloseTypeEnum(TradeCloseTypeEnum tradeCloseTypeEnum) {
        this.tradeCloseTypeEnum = tradeCloseTypeEnum;
        return this;
    }

    public Boolean getNeedCardInfo() {
        return needCardInfo;
    }

    public QueryUserTradeRequest setNeedCardInfo(Boolean needCardInfo) {
        this.needCardInfo = needCardInfo;
        return this;
    }

    //    @Override
//    public void validate() {
//        if (StringUtils.isEmpty(userCode)) {
//            throw new ApplicationException("Parameter error");
//        }
//
//        if (page == null) {
//            page = new Page();
//        }
//
//    }
}
